home *** CD-ROM | disk | FTP | other *** search
- surface
- WWTranslucentPlastic(float Ks = 0.5,
- Kd = 0.5,
- Ka = 1.0,
- roughness = 0.1;
- color specularcolor = 1.0,
- opacity = 0.5)
- {
- point Nf = faceforward(normalize(N), I );
- point V = normalize(-I);
-
- Oi = Os * opacity;
- Ci = Oi * ( Cs * (Ka*ambient() + Kd*diffuse(Nf)) +
- specularcolor * Ks * specular(Nf,V,roughness) );
- }
-